<?php
namespace User\Controller;
use Think\Controller;
use Think\Crypt;
use Org\Net;
 /**
 *  检查作弊模块
 */
class SoController extends Controller {
    
    //输出js
    public function index()
    { 
      header('Content-Type: application/x-javascript; charset=UTF-8');
      $data=file_get_contents(APP_PATH."Lib/So.js");
      $time = C("FANGWEN_TIME");
      $data=str_replace("{time}", $time,$data);
      die($data);
    }
    

    //获取请求
    public function run()
    {
      //先判断是否Ajax 
      if(!IS_AJAX){die("404");}
      if(C("CHAOGAOJI_LANJIE"))
      { 
          import("Lib.Token.Token");
          $token= new \Token();
          $post=I('post.');
          if(!$token->autoCheckToken($post)){ 
            die("404");
          }
      }
      $data=I('get.');
      $data["HTTP_REFERER"]=$_SERVER['HTTP_REFERER'];
      import("Lib.Jifei.Jifei");
      $jifei= new \Jifei($data);
      $jifei->run();
    }
     




}